package br.com.j7.jdesk.persistence.repository.impl;

import java.util.List;

import br.com.j7.jdesk.library.exception.RepositoryException;
import br.com.j7.jdesk.persistence.entity.Log;
import br.com.j7.jdesk.persistence.repository.LogRepository;

/**
 * 
 * 
 * @author Edivando Alves
 *
 */
public class LogRepositoryImpl extends AbstractRepository<Log> implements LogRepository{
	//TODO:implementar
	public LogRepositoryImpl() {
		super();
	}

	@Override
	public Log find(Integer id) throws RepositoryException {
		try {
			return getEntity(Log.class, id);
		} catch (RepositoryException e) {
			throw new RepositoryException(e);
		}
	}
	
	public Log addLog(String action) throws RepositoryException{
		try {
			return add(new Log(action));
		} catch (RepositoryException e) {
			throw new RepositoryException(e);
		}
	}

	@Override
	public List<Log> list() throws RepositoryException {
		// TODO Auto-generated method stub
		return null;
	}


}
